home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / opussdk / docs / args.doc < prev    next >
Text File  |  1996-09-05  |  2KB  |  80 lines

  1. TABLE OF CONTENTS
  2.  
  3. dopus5.library/ParseArgs
  4. dopus5.library/DisposeArgs
  5. dopus5.library/ParseArgs                             dopus5.library/ParseArgs
  6.  
  7.     NAME
  8.         ParseArgs - easier interface to ReadArgs()
  9.  
  10.     SYNOPSIS
  11.         ParseArgs(template, args)
  12.                      A0      A1
  13.  
  14.         FuncArgs *ParseArgs(char *, char *);
  15.  
  16.     FUNCTION
  17.         This routine makes it much more straightforward to use ReadArgs() to
  18.         parse an argument string. Using ReadArgs to parse a string requires
  19.         you to allocate and initialise a RDArgs structure and argument
  20.         array structure, and also requires the argument string to have a 
  21.         newline character. This function automates this process for you.
  22.  
  23.     INPUTS
  24.         template - pointer to ReadArgs template string
  25.         args - pointer to argument string (need not have a newline)
  26.  
  27.     RESULT
  28.         If successful, this function returns a FuncArgs structure. This
  29.         structure has several fields, but the useful ones are :
  30.  
  31.             FA_Arguments
  32.  
  33.             This is the argument array you should use. It is an array
  34.             of long *, each member of which points to the argument result
  35.             for the corresponding template entry. If you need to modify
  36.             any of the values in this array you can, as it is just a copy
  37.             of the real array.
  38.  
  39.             FA_Count
  40.  
  41.             This contains the number of arguments in the template. Opus
  42.             counts the arguments in the template and initialises the
  43.             argument array accordingly.
  44.  
  45.         The strings supplied to this function are not needed once the
  46.         function has returned.
  47.  
  48.     NOTES
  49.         You should use this routine when parsing arguments supplied to
  50.         your Opus modules.
  51.  
  52.     SEE ALSO
  53.         DisposeArgs(), dos.library/ReadArgs()
  54.  
  55. dopus5.library/DisposeArgs                         dopus5.library/DisposeArgs
  56.  
  57.     NAME
  58.         DisposeArgs - free a FuncArgs structure
  59.  
  60.     SYNOPSIS
  61.         DisposeArgs(funcargs)
  62.                        A0
  63.  
  64.         void DisposeArgs(FuncArgs *);
  65.  
  66.     FUNCTION
  67.         This function frees the FuncArgs structure returned by ParseArgs().
  68.  
  69.     INPUTS
  70.         funcargs - pointer to FuncArgs structure to free
  71.  
  72.     RESULT
  73.         The structure is free. Once you have freed it, none of the arguments
  74.         remain valid, so you should make local copies of anything you need
  75.         to refer to.
  76.  
  77.     SEE ALSO
  78.         ParseArgs(), dos.library/ReadArgs()
  79.  
  80.